package com.itmd.dao.imp;

import com.itmd.dao.UserDao;
import com.itmd.domain.User;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

public class UserDapImp {

    public List<User> findAll() throws IOException {

//        InputStream resourceAsStream = Resources.getResourceAsStream("sqlMapconfig.xml");
//
//        SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(resourceAsStream);
//
//        SqlSession sqlSession = sqlSessionFactory.openSession();

//        return sqlSession.selectList("com.itmd.domain.User.findAll");
        return null;
    }
}
